from sentence_transformers import SentenceTransformer

model = SentenceTransformer("BAAI/bge-small-zh-v1.5")
text = "如何将文本转换为向量？"
embedding = model.encode(text)  # 形状: (768,)